package AboutSort;

import java.util.Random;

public class TestSort {


    public static void main(String[] args){
        QuickSort2 quickSort2 = new QuickSort2();

        Sort2 sort2 = new Sort2();

        int[] nums = new int[1000000];

        Random random = new Random();

        for(int i = 0 ; i <1000000 ; i++){
            nums[i] = random.nextInt(2000);
        }

        long s = System.nanoTime();
//        int[] ints = sort2.sort1(nums);
        quickSort2.sort(nums);
        for(int i : nums) {
            System.out.print(i+" ");
        }
        System.out.println("");
        long e = System.nanoTime();
        //1. 17528000 1s = 100 0000微秒
        System.out.println("耗时:"+(e-s));
    }
}
